package com.java.demo.concurrent;

import java.util.concurrent.ConcurrentHashMap;

public class ConcurrentHashMapDemo {
    public static void main(String[] args) {
        ConcurrentHashMap<String, String> map = new ConcurrentHashMap<String, String>(3);
        map.put("data1", "value1");
        map.put("data1", "value2");
        System.out.println(map.size()); // 1
        System.out.println(map.get("data1")); // value2
    }
}
